.chat-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80vh;
    width: 700px;
    margin: 0 auto;
    background-color: #333;
    color: #fff;
    border-radius: 10px;
}

.chat-header {
    width: 100%;
    padding: 20px;
    background-color: #090A1A;
    color: #fff;
    text-align: center;
}

.chat-header h1 {
    margin: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    width: 100%;
}

.message {
    display: flex;
    margin-bottom: 10px;
    padding: 10px;
    max-width: fit-content;
    align-items: end;
}

.my-message {
    margin-left: auto;
    flex-direction: row-reverse;

    .message-content {
        display: flex;
        flex-direction: column;
        background-color: #5865f2;
        border-radius: 15px 15px 0 15px;
        justify-content: flex-end;
    }

    .message-sender {
        display: flex;
        justify-content: flex-end;
    }

    .message-text {
        display: flex;
        justify-content: flex-end;
    }
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 10px;
}

.message-content {
    background-color: #222;
    border-radius: 15px 15px 15px 0;
    padding: 4px 15px;
    font-size: 12px;
    max-width: 70vw;
}

.message-sender {
    font-weight: bold;
    margin-bottom: 2px;
}

.message-text {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.chat-input {
    width: 80%;
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #555;
}

.chat-input input {
    flex: 1;
    padding: 8px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    background-color: #444;
    color: #fff;
}

.chat-input button {
    padding: 8px 16px;
    background-color: #6f42c1;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-input button:hover {
    background-color: #53308f;
    transform: scale(1.05);
    transition: all 0.3s;
}

.chat-messages {
    overflow-y: auto;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #6f42c1;
    border-radius: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background-color: #444;
}

.error-message {
    color: red;
    margin-bottom: 5px;
    font-weight: bold;
}
